import { defineConfig } from 'astro/config';
import image from '@astrojs/image';
import mdx from '@astrojs/mdx';
import svelte from "@astrojs/svelte";
import sitemap from "@astrojs/sitemap";
import UnoCSS from 'unocss/astro'

// https://astro.build/config
export default defineConfig({
  // experimental: { integrations: true },
  integrations: [
    UnoCSS(),
    svelte(),
    sitemap(),
    image(),
    mdx()
  ],
 markdown: {
    // Can be 'shiki' (default), 'prism' or false to disable highlighting
    syntaxHighlight: 'prism',
  },
  vite: {
    ssr: {
		noExternal: ['three', 'troika-three-text']
	},
    build: {
      rollupOptions: {
        output: {
          entryFileNames: 'entry.[hash].js',
          chunkFileNames: 'chunks/chunk.[hash].js',
          assetFileNames: 'assets/asset.[hash][extname]',
        },
      },
    },
  },
});